package com.cyc.common.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import lombok.Getter;

import java.util.EnumSet;
import java.util.HashMap;


/**
 * @author fei
 */
@Getter
public enum UserTypeEnum {

    VIDEO(1,"系统用户"),
    IMAGE(2,"C端用户");

    @EnumValue
    private int code;

    private String value;

    UserTypeEnum(int code, String value) {
        this.code = code;
        this.value = value;
    }
    /**
     * 获取用户类型集合Map
     * @return
     */
    public static HashMap<Integer,String> getUserTypeMap() {
        HashMap<Integer, String> map = new HashMap<>();
        for (UserTypeEnum userTypeEnum : EnumSet.allOf(UserTypeEnum.class)) {
            map.put(userTypeEnum.code, userTypeEnum.value);
        }
        return map;
    }
}
